
/**    
 * <p>Copyright： 东软烟草产品研发团队</p>   
 */

package com.jkl.service.person;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jkl.dao.person.BsPersonMapper;
import com.jkl.entity.person.BsPerson;
import com.jkl.service.person.inter.BsPersonServiceInterface;

import lombok.extern.slf4j.Slf4j;

/**
 * <p>
 * 123service
 * <p>
 * <p>
 * 123service
 * <p>
 * <p>
 * 变更说明：lin.pf 2018年1月17日 123service
 * <p>
 * Date:2018年10月01日
 * 
 * @author lin.pf
 * @version 1.0
 */
@Service
@Slf4j
public class BsPersonService implements BsPersonServiceInterface {

	@Autowired
	private BsPersonMapper bsPersonMapper;

	@Override
	public PageInfo<BsPerson> findPersonByAreaId(BsPerson params) {
		PageHelper.startPage(params.getCurrentPage(), params.getPageSize());
		return new PageInfo<>(bsPersonMapper.findPersonByAreaId(params));
	}

	@Override
	public void updatePersonByParam(BsPerson params) {
		bsPersonMapper.updateByPrimaryKey(params);
	}

	@Override
	public void addPerson(BsPerson person) {
		bsPersonMapper.insert(person);
	}

	@Override
	public List<BsPerson> getPersonByDept(BsPerson person) {
		return bsPersonMapper.getPersonByDept(person);
	}
}